package cn.jg.framework.common.util;


import org.apache.commons.collections4.MapUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by luowei on 2020/4/2.
 */
public class EnrichMapUtils {
	public static Map<String, String> convertArrayToString(Map<String, String[]> stringMap) {
		Map<String, String> returnMap = new HashMap<>();
		if (MapUtils.isNotEmpty(stringMap)) {
			for (Map.Entry<String, String[]> entry : stringMap.entrySet()) {
				returnMap.put(entry.getKey(), entry.getValue() == null ? "" : entry.getValue()[0]);
			}
		}
		return returnMap;
	}
}
